class People:
    school = '清华'
    def __init__(self,name,sex,age):
        self.name=name
        self.sex=sex
        self.age=age

class Teacher(People):
    def __init__(self,name,sex,age,title):
        super().__init__(name,sex,age)
        #调用的是绑定方法，自动传入self
        self.title=title
    def teach(self):
        print(f'{self.name}是老师,{self.age}岁')

obj=Teacher('lili','female',28,'高级教师')
obj.teach()